// pages/courItem/courItem.js
var t = getApp();

Component({
  properties: {
    com_data: {
      type: Object,
      value: ""
    },
    show_address: {
      type: Boolean,
      value: !1
    },
    show_line: {
      type: Boolean,
      value: !1
    },
    source:{
      type:Number,
      value: 0
    }
  },
  data: {
    typetexts:['节','月','季','期','年']
  },
  ready: function(){
    // var query = wx.createSelectorQuery().in(this);
    // query.selectAll('.ke_item').boundingClientRect(function (res) {
    //   console.log(res)
    // }).exec()
  },
  methods: {
    nav_cour_detail:function(e){
      var show_address=this.properties.show_address;
      var id=e.currentTarget.dataset.id;
      wx.navigateTo({
        url: '../../pages/courseDetail/courseDetail?id='+id+'&status='+this.properties.source,
      })
      // if(show_address){
      //   wx.navigateTo({
      //     url: '../../pages/courseDetail/courseDetail?id='+id,
      //   })
      // }else{
      //   wx.redirectTo({
      //     url: '../../pages/courseDetail/courseDetail?id='+id,
      //   })
      // }
    },
  },
});